<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Rational Real World Tests</title>
<link rel="stylesheet" href="../../multiprecision.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Multiprecision">
<link rel="up" href="../perf.html" title="Performance Comparison">
<link rel="prev" href="int_real_world.html" title="Integer Real World Tests">
<link rel="next" href="float_performance.html" title="Float Algorithm Performance">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="int_real_world.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="float_performance.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_multiprecision.perf.rational_real_world"></a><a class="link" href="rational_real_world.html" title="Rational Real World Tests">Rational
      Real World Tests</a>
</h3></div></div></div>
<p>
        The first set of <a href="http://www.boost.org/doc/libs/release/libs/multiprecision/doc/html/../../performance/rational_bernoulli_bench.cpp" target="_top">tests</a>
        measure the times taken to calculate the n'th Bernoulli number via mixed
        rational/integer arithmetic to give an exact rational result.
      </p>
<div class="table">
<a name="boost_multiprecision.perf.rational_real_world.relative_times_taken_to_calculat"></a><p class="title"><b>Table 1.18. Relative times taken to calculate Bm</b></p>
<div class="table-contents"><table class="table" summary="Relative times taken to calculate Bm">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  m
                </p>
              </th>
<th>
                <p>
                  cpp_rational (time in seconds)
                </p>
              </th>
<th>
                <p>
                  mpq_rational (time relative to cpp_rational)
                </p>
              </th>
<th>
                <p>
                  mpq_class (time relative to cpp_rational)
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  50
                </p>
              </td>
<td>
                <p>
                  1.888453
                </p>
              </td>
<td>
                <p>
                  1.7317576874
                </p>
              </td>
<td>
                <p>
                  1.893438174
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  54
                </p>
              </td>
<td>
                <p>
                  2.250503
                </p>
              </td>
<td>
                <p>
                  2.1519411438
                </p>
              </td>
<td>
                <p>
                  2.4936252029
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  58
                </p>
              </td>
<td>
                <p>
                  2.734527
                </p>
              </td>
<td>
                <p>
                  2.2056805437
                </p>
              </td>
<td>
                <p>
                  1.9866752093
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  62
                </p>
              </td>
<td>
                <p>
                  3.318122
                </p>
              </td>
<td>
                <p>
                  2.5182796172
                </p>
              </td>
<td>
                <p>
                  2.2662876772
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  66
                </p>
              </td>
<td>
                <p>
                  3.887281
                </p>
              </td>
<td>
                <p>
                  2.4263077457
                </p>
              </td>
<td>
                <p>
                  2.588347485
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  70
                </p>
              </td>
<td>
                <p>
                  4.628535
                </p>
              </td>
<td>
                <p>
                  1.9756346231
                </p>
              </td>
<td>
                <p>
                  2.5367158291
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  74
                </p>
              </td>
<td>
                <p>
                  5.3541
                </p>
              </td>
<td>
                <p>
                  1.7052929531
                </p>
              </td>
<td>
                <p>
                  2.3345854579
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  78
                </p>
              </td>
<td>
                <p>
                  6.321172
                </p>
              </td>
<td>
                <p>
                  1.6669601776
                </p>
              </td>
<td>
                <p>
                  2.0390342171
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  82
                </p>
              </td>
<td>
                <p>
                  7.13052
                </p>
              </td>
<td>
                <p>
                  1.7689101216
                </p>
              </td>
<td>
                <p>
                  1.9837833706
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  86
                </p>
              </td>
<td>
                <p>
                  8.390095
                </p>
              </td>
<td>
                <p>
                  1.6245518078
                </p>
              </td>
<td>
                <p>
                  1.5785492298
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  90
                </p>
              </td>
<td>
                <p>
                  10.62176
                </p>
              </td>
<td>
                <p>
                  1.6294440846
                </p>
              </td>
<td>
                <p>
                  1.5779053566
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  94
                </p>
              </td>
<td>
                <p>
                  11.364409
                </p>
              </td>
<td>
                <p>
                  1.5786845581
                </p>
              </td>
<td>
                <p>
                  1.5614997665
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  98
                </p>
              </td>
<td>
                <p>
                  14.030636
                </p>
              </td>
<td>
                <p>
                  1.2616490799
                </p>
              </td>
<td>
                <p>
                  1.4799734666
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  102
                </p>
              </td>
<td>
                <p>
                  15.268211
                </p>
              </td>
<td>
                <p>
                  1.6145657798
                </p>
              </td>
<td>
                <p>
                  1.6128342738
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  106
                </p>
              </td>
<td>
                <p>
                  15.253028
                </p>
              </td>
<td>
                <p>
                  1.8985381788
                </p>
              </td>
<td>
                <p>
                  1.8206293859
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  110
                </p>
              </td>
<td>
                <p>
                  17.637756
                </p>
              </td>
<td>
                <p>
                  1.8283953469
                </p>
              </td>
<td>
                <p>
                  1.6559522084
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  114
                </p>
              </td>
<td>
                <p>
                  18.335007
                </p>
              </td>
<td>
                <p>
                  1.8018346543
                </p>
              </td>
<td>
                <p>
                  1.8343225612
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  118
                </p>
              </td>
<td>
                <p>
                  21.044146
                </p>
              </td>
<td>
                <p>
                  2.0462015897
                </p>
              </td>
<td>
                <p>
                  1.8106934346
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  122
                </p>
              </td>
<td>
                <p>
                  23.71295
                </p>
              </td>
<td>
                <p>
                  2.0041556196
                </p>
              </td>
<td>
                <p>
                  1.7127701108
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  126
                </p>
              </td>
<td>
                <p>
                  25.993901
                </p>
              </td>
<td>
                <p>
                  1.9901613075
                </p>
              </td>
<td>
                <p>
                  1.6974264848
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  130
                </p>
              </td>
<td>
                <p>
                  30.17278
                </p>
              </td>
<td>
                <p>
                  1.8897211328
                </p>
              </td>
<td>
                <p>
                  1.6405006433
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  134
                </p>
              </td>
<td>
                <p>
                  43.992333
                </p>
              </td>
<td>
                <p>
                  1.2223514038
                </p>
              </td>
<td>
                <p>
                  1.2232961594
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  138
                </p>
              </td>
<td>
                <p>
                  40.702777
                </p>
              </td>
<td>
                <p>
                  1.3551305848
                </p>
              </td>
<td>
                <p>
                  1.492072224
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  142
                </p>
              </td>
<td>
                <p>
                  47.01495
                </p>
              </td>
<td>
                <p>
                  1.4361410785
                </p>
              </td>
<td>
                <p>
                  1.4005683724
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  146
                </p>
              </td>
<td>
                <p>
                  51.468592
                </p>
              </td>
<td>
                <p>
                  1.4279172043
                </p>
              </td>
<td>
                <p>
                  1.4072223891
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  150
                </p>
              </td>
<td>
                <p>
                  70.736106
                </p>
              </td>
<td>
                <p>
                  1.3628087048
                </p>
              </td>
<td>
                <p>
                  1.2309294917
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  154
                </p>
              </td>
<td>
                <p>
                  74.638691
                </p>
              </td>
<td>
                <p>
                  1.2509392749
                </p>
              </td>
<td>
                <p>
                  1.2846060497
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  158
                </p>
              </td>
<td>
                <p>
                  76.642396
                </p>
              </td>
<td>
                <p>
                  1.3383691449
                </p>
              </td>
<td>
                <p>
                  1.2555573941
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  162
                </p>
              </td>
<td>
                <p>
                  104.906795
                </p>
              </td>
<td>
                <p>
                  1.1722665057
                </p>
              </td>
<td>
                <p>
                  1.0121124375
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  166
                </p>
              </td>
<td>
                <p>
                  108.175914
                </p>
              </td>
<td>
                <p>
                  0.9272805682
                </p>
              </td>
<td>
                <p>
                  1.2472813403
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  170
                </p>
              </td>
<td>
                <p>
                  125.363885
                </p>
              </td>
<td>
                <p>
                  0.8114005082
                </p>
              </td>
<td>
                <p>
                  1.1349673712
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  174
                </p>
              </td>
<td>
                <p>
                  119.813754
                </p>
              </td>
<td>
                <p>
                  0.9747547014
                </p>
              </td>
<td>
                <p>
                  1.5677900135
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  178
                </p>
              </td>
<td>
                <p>
                  130.672631
                </p>
              </td>
<td>
                <p>
                  0.904429444
                </p>
              </td>
<td>
                <p>
                  1.6089208382
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  182
                </p>
              </td>
<td>
                <p>
                  136.002124
                </p>
              </td>
<td>
                <p>
                  0.8359445107
                </p>
              </td>
<td>
                <p>
                  1.3173987636
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  186
                </p>
              </td>
<td>
                <p>
                  152.169271
                </p>
              </td>
<td>
                <p>
                  0.7919228515
                </p>
              </td>
<td>
                <p>
                  1.3523570012
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  190
                </p>
              </td>
<td>
                <p>
                  149.444035
                </p>
              </td>
<td>
                <p>
                  0.8353259734
                </p>
              </td>
<td>
                <p>
                  1.4571606823
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  194
                </p>
              </td>
<td>
                <p>
                  149.609183
                </p>
              </td>
<td>
                <p>
                  0.8898088896
                </p>
              </td>
<td>
                <p>
                  1.6132629038
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  198
                </p>
              </td>
<td>
                <p>
                  167.594528
                </p>
              </td>
<td>
                <p>
                  0.8947434429
                </p>
              </td>
<td>
                <p>
                  1.326461858
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
        In this use case, most the of the rational numbers are fairly small and so
        the times taken are dominated by the number of allocations performed. The
        following table illustrates how well each type performs on suppressing allocations:
      </p>
<div class="table">
<a name="boost_multiprecision.perf.rational_real_world.total_allocation_counts_for_bern"></a><p class="title"><b>Table 1.19. Total Allocation Counts for Bernoulli Number Calculation</b></p>
<div class="table-contents"><table class="table" summary="Total Allocation Counts for Bernoulli Number Calculation">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  m
                </p>
              </th>
<th>
                <p>
                  cpp_rational
                </p>
              </th>
<th>
                <p>
                  mpq_rational
                </p>
              </th>
<th>
                <p>
                  mpq_class
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  2
                </p>
              </td>
<td>
                <p>
                  0
                </p>
              </td>
<td>
                <p>
                  77
                </p>
              </td>
<td>
                <p>
                  101
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  4
                </p>
              </td>
<td>
                <p>
                  0
                </p>
              </td>
<td>
                <p>
                  187
                </p>
              </td>
<td>
                <p>
                  252
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  6
                </p>
              </td>
<td>
                <p>
                  0
                </p>
              </td>
<td>
                <p>
                  345
                </p>
              </td>
<td>
                <p>
                  471
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  8
                </p>
              </td>
<td>
                <p>
                  0
                </p>
              </td>
<td>
                <p>
                  551
                </p>
              </td>
<td>
                <p>
                  758
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  10
                </p>
              </td>
<td>
                <p>
                  0
                </p>
              </td>
<td>
                <p>
                  805
                </p>
              </td>
<td>
                <p>
                  1113
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  12
                </p>
              </td>
<td>
                <p>
                  0
                </p>
              </td>
<td>
                <p>
                  1107
                </p>
              </td>
<td>
                <p>
                  1536
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  14
                </p>
              </td>
<td>
                <p>
                  0
                </p>
              </td>
<td>
                <p>
                  1457
                </p>
              </td>
<td>
                <p>
                  2027
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  16
                </p>
              </td>
<td>
                <p>
                  0
                </p>
              </td>
<td>
                <p>
                  1857
                </p>
              </td>
<td>
                <p>
                  2587
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  18
                </p>
              </td>
<td>
                <p>
                  0
                </p>
              </td>
<td>
                <p>
                  2336
                </p>
              </td>
<td>
                <p>
                  3216
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  20
                </p>
              </td>
<td>
                <p>
                  0
                </p>
              </td>
<td>
                <p>
                  2885
                </p>
              </td>
<td>
                <p>
                  3913
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  22
                </p>
              </td>
<td>
                <p>
                  6
                </p>
              </td>
<td>
                <p>
                  3511
                </p>
              </td>
<td>
                <p>
                  4706
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  24
                </p>
              </td>
<td>
                <p>
                  22
                </p>
              </td>
<td>
                <p>
                  4203
                </p>
              </td>
<td>
                <p>
                  5600
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  26
                </p>
              </td>
<td>
                <p>
                  83
                </p>
              </td>
<td>
                <p>
                  4963
                </p>
              </td>
<td>
                <p>
                  6575
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  28
                </p>
              </td>
<td>
                <p>
                  377
                </p>
              </td>
<td>
                <p>
                  5806
                </p>
              </td>
<td>
                <p>
                  7632
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  30
                </p>
              </td>
<td>
                <p>
                  780
                </p>
              </td>
<td>
                <p>
                  6738
                </p>
              </td>
<td>
                <p>
                  8769
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  32
                </p>
              </td>
<td>
                <p>
                  1454
                </p>
              </td>
<td>
                <p>
                  7771
                </p>
              </td>
<td>
                <p>
                  9988
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  34
                </p>
              </td>
<td>
                <p>
                  2001
                </p>
              </td>
<td>
                <p>
                  9357
                </p>
              </td>
<td>
                <p>
                  11289
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  36
                </p>
              </td>
<td>
                <p>
                  2789
                </p>
              </td>
<td>
                <p>
                  10598
                </p>
              </td>
<td>
                <p>
                  12704
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  38
                </p>
              </td>
<td>
                <p>
                  3669
                </p>
              </td>
<td>
                <p>
                  11948
                </p>
              </td>
<td>
                <p>
                  14252
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  40
                </p>
              </td>
<td>
                <p>
                  4653
                </p>
              </td>
<td>
                <p>
                  13403
                </p>
              </td>
<td>
                <p>
                  15891
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  42
                </p>
              </td>
<td>
                <p>
                  5923
                </p>
              </td>
<td>
                <p>
                  14976
                </p>
              </td>
<td>
                <p>
                  17620
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  44
                </p>
              </td>
<td>
                <p>
                  7379
                </p>
              </td>
<td>
                <p>
                  16622
                </p>
              </td>
<td>
                <p>
                  19449
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  46
                </p>
              </td>
<td>
                <p>
                  8839
                </p>
              </td>
<td>
                <p>
                  18367
                </p>
              </td>
<td>
                <p>
                  21367
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  48
                </p>
              </td>
<td>
                <p>
                  10296
                </p>
              </td>
<td>
                <p>
                  20227
                </p>
              </td>
<td>
                <p>
                  23431
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  50
                </p>
              </td>
<td>
                <p>
                  12045
                </p>
              </td>
<td>
                <p>
                  22857
                </p>
              </td>
<td>
                <p>
                  25646
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  52
                </p>
              </td>
<td>
                <p>
                  13603
                </p>
              </td>
<td>
                <p>
                  25044
                </p>
              </td>
<td>
                <p>
                  27962
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  54
                </p>
              </td>
<td>
                <p>
                  15276
                </p>
              </td>
<td>
                <p>
                  27331
                </p>
              </td>
<td>
                <p>
                  30389
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  56
                </p>
              </td>
<td>
                <p>
                  17239
                </p>
              </td>
<td>
                <p>
                  29749
                </p>
              </td>
<td>
                <p>
                  32919
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  58
                </p>
              </td>
<td>
                <p>
                  19337
                </p>
              </td>
<td>
                <p>
                  32257
                </p>
              </td>
<td>
                <p>
                  35552
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  60
                </p>
              </td>
<td>
                <p>
                  21409
                </p>
              </td>
<td>
                <p>
                  34958
                </p>
              </td>
<td>
                <p>
                  38417
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  62
                </p>
              </td>
<td>
                <p>
                  23694
                </p>
              </td>
<td>
                <p>
                  37800
                </p>
              </td>
<td>
                <p>
                  41396
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  64
                </p>
              </td>
<td>
                <p>
                  27923
                </p>
              </td>
<td>
                <p>
                  39556
                </p>
              </td>
<td>
                <p>
                  44498
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  66
                </p>
              </td>
<td>
                <p>
                  30240
                </p>
              </td>
<td>
                <p>
                  44706
                </p>
              </td>
<td>
                <p>
                  47711
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  68
                </p>
              </td>
<td>
                <p>
                  32566
                </p>
              </td>
<td>
                <p>
                  47934
                </p>
              </td>
<td>
                <p>
                  51042
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  70
                </p>
              </td>
<td>
                <p>
                  35019
                </p>
              </td>
<td>
                <p>
                  51417
                </p>
              </td>
<td>
                <p>
                  54637
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  72
                </p>
              </td>
<td>
                <p>
                  37460
                </p>
              </td>
<td>
                <p>
                  55047
                </p>
              </td>
<td>
                <p>
                  58363
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  74
                </p>
              </td>
<td>
                <p>
                  40282
                </p>
              </td>
<td>
                <p>
                  58777
                </p>
              </td>
<td>
                <p>
                  62211
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  76
                </p>
              </td>
<td>
                <p>
                  42914
                </p>
              </td>
<td>
                <p>
                  62691
                </p>
              </td>
<td>
                <p>
                  66183
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  78
                </p>
              </td>
<td>
                <p>
                  45752
                </p>
              </td>
<td>
                <p>
                  66694
                </p>
              </td>
<td>
                <p>
                  70296
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  80
                </p>
              </td>
<td>
                <p>
                  48681
                </p>
              </td>
<td>
                <p>
                  70905
                </p>
              </td>
<td>
                <p>
                  74620
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  82
                </p>
              </td>
<td>
                <p>
                  51986
                </p>
              </td>
<td>
                <p>
                  77633
                </p>
              </td>
<td>
                <p>
                  79160
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  84
                </p>
              </td>
<td>
                <p>
                  54855
                </p>
              </td>
<td>
                <p>
                  82364
                </p>
              </td>
<td>
                <p>
                  83842
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  86
                </p>
              </td>
<td>
                <p>
                  59032
                </p>
              </td>
<td>
                <p>
                  87239
                </p>
              </td>
<td>
                <p>
                  88659
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  88
                </p>
              </td>
<td>
                <p>
                  63595
                </p>
              </td>
<td>
                <p>
                  92256
                </p>
              </td>
<td>
                <p>
                  93618
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  90
                </p>
              </td>
<td>
                <p>
                  68352
                </p>
              </td>
<td>
                <p>
                  97486
                </p>
              </td>
<td>
                <p>
                  98820
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  92
                </p>
              </td>
<td>
                <p>
                  72446
                </p>
              </td>
<td>
                <p>
                  102974
                </p>
              </td>
<td>
                <p>
                  104256
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  94
                </p>
              </td>
<td>
                <p>
                  76468
                </p>
              </td>
<td>
                <p>
                  108620
                </p>
              </td>
<td>
                <p>
                  109844
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  96
                </p>
              </td>
<td>
                <p>
                  80361
                </p>
              </td>
<td>
                <p>
                  111109
                </p>
              </td>
<td>
                <p>
                  115594
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  98
                </p>
              </td>
<td>
                <p>
                  84783
                </p>
              </td>
<td>
                <p>
                  121460
                </p>
              </td>
<td>
                <p>
                  121486
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  100
                </p>
              </td>
<td>
                <p>
                  89044
                </p>
              </td>
<td>
                <p>
                  127730
                </p>
              </td>
<td>
                <p>
                  127633
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  102
                </p>
              </td>
<td>
                <p>
                  93561
                </p>
              </td>
<td>
                <p>
                  134241
                </p>
              </td>
<td>
                <p>
                  134050
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  104
                </p>
              </td>
<td>
                <p>
                  98452
                </p>
              </td>
<td>
                <p>
                  140919
                </p>
              </td>
<td>
                <p>
                  140616
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  106
                </p>
              </td>
<td>
                <p>
                  103530
                </p>
              </td>
<td>
                <p>
                  147763
                </p>
              </td>
<td>
                <p>
                  147364
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  108
                </p>
              </td>
<td>
                <p>
                  108326
                </p>
              </td>
<td>
                <p>
                  154804
                </p>
              </td>
<td>
                <p>
                  154276
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  110
                </p>
              </td>
<td>
                <p>
                  113891
                </p>
              </td>
<td>
                <p>
                  162184
                </p>
              </td>
<td>
                <p>
                  161562
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  112
                </p>
              </td>
<td>
                <p>
                  119213
                </p>
              </td>
<td>
                <p>
                  169736
                </p>
              </td>
<td>
                <p>
                  169038
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  114
                </p>
              </td>
<td>
                <p>
                  124770
                </p>
              </td>
<td>
                <p>
                  182417
                </p>
              </td>
<td>
                <p>
                  176693
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  116
                </p>
              </td>
<td>
                <p>
                  130624
                </p>
              </td>
<td>
                <p>
                  190589
                </p>
              </td>
<td>
                <p>
                  184519
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  118
                </p>
              </td>
<td>
                <p>
                  137941
                </p>
              </td>
<td>
                <p>
                  198975
                </p>
              </td>
<td>
                <p>
                  192525
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  120
                </p>
              </td>
<td>
                <p>
                  144829
                </p>
              </td>
<td>
                <p>
                  207759
                </p>
              </td>
<td>
                <p>
                  200952
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  122
                </p>
              </td>
<td>
                <p>
                  152045
                </p>
              </td>
<td>
                <p>
                  216736
                </p>
              </td>
<td>
                <p>
                  209561
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  124
                </p>
              </td>
<td>
                <p>
                  158610
                </p>
              </td>
<td>
                <p>
                  225905
                </p>
              </td>
<td>
                <p>
                  218371
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  126
                </p>
              </td>
<td>
                <p>
                  165383
                </p>
              </td>
<td>
                <p>
                  235283
                </p>
              </td>
<td>
                <p>
                  227360
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  128
                </p>
              </td>
<td>
                <p>
                  173971
                </p>
              </td>
<td>
                <p>
                  230678
                </p>
              </td>
<td>
                <p>
                  236670
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  130
                </p>
              </td>
<td>
                <p>
                  181696
                </p>
              </td>
<td>
                <p>
                  248593
                </p>
              </td>
<td>
                <p>
                  246308
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  132
                </p>
              </td>
<td>
                <p>
                  189310
                </p>
              </td>
<td>
                <p>
                  258615
                </p>
              </td>
<td>
                <p>
                  256148
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  134
                </p>
              </td>
<td>
                <p>
                  197708
                </p>
              </td>
<td>
                <p>
                  268800
                </p>
              </td>
<td>
                <p>
                  266192
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  136
                </p>
              </td>
<td>
                <p>
                  205800
                </p>
              </td>
<td>
                <p>
                  279215
                </p>
              </td>
<td>
                <p>
                  276436
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  138
                </p>
              </td>
<td>
                <p>
                  212940
                </p>
              </td>
<td>
                <p>
                  290112
                </p>
              </td>
<td>
                <p>
                  287167
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  140
                </p>
              </td>
<td>
                <p>
                  217502
                </p>
              </td>
<td>
                <p>
                  301235
                </p>
              </td>
<td>
                <p>
                  298101
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  142
                </p>
              </td>
<td>
                <p>
                  223486
                </p>
              </td>
<td>
                <p>
                  312564
                </p>
              </td>
<td>
                <p>
                  309243
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  144
                </p>
              </td>
<td>
                <p>
                  229579
                </p>
              </td>
<td>
                <p>
                  324133
                </p>
              </td>
<td>
                <p>
                  320605
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  146
                </p>
              </td>
<td>
                <p>
                  237213
                </p>
              </td>
<td>
                <p>
                  344671
                </p>
              </td>
<td>
                <p>
                  332333
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  148
                </p>
              </td>
<td>
                <p>
                  248799
                </p>
              </td>
<td>
                <p>
                  357200
                </p>
              </td>
<td>
                <p>
                  344420
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  150
                </p>
              </td>
<td>
                <p>
                  261345
                </p>
              </td>
<td>
                <p>
                  369947
                </p>
              </td>
<td>
                <p>
                  356745
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  152
                </p>
              </td>
<td>
                <p>
                  272741
                </p>
              </td>
<td>
                <p>
                  382909
                </p>
              </td>
<td>
                <p>
                  369279
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  154
                </p>
              </td>
<td>
                <p>
                  283982
                </p>
              </td>
<td>
                <p>
                  396162
                </p>
              </td>
<td>
                <p>
                  382048
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  156
                </p>
              </td>
<td>
                <p>
                  293626
                </p>
              </td>
<td>
                <p>
                  409993
                </p>
              </td>
<td>
                <p>
                  395353
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  158
                </p>
              </td>
<td>
                <p>
                  304036
                </p>
              </td>
<td>
                <p>
                  424022
                </p>
              </td>
<td>
                <p>
                  408907
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  160
                </p>
              </td>
<td>
                <p>
                  313869
                </p>
              </td>
<td>
                <p>
                  427747
                </p>
              </td>
<td>
                <p>
                  422690
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  162
                </p>
              </td>
<td>
                <p>
                  323626
                </p>
              </td>
<td>
                <p>
                  454723
                </p>
              </td>
<td>
                <p>
                  436715
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  164
                </p>
              </td>
<td>
                <p>
                  333294
                </p>
              </td>
<td>
                <p>
                  469863
                </p>
              </td>
<td>
                <p>
                  451304
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  166
                </p>
              </td>
<td>
                <p>
                  343072
                </p>
              </td>
<td>
                <p>
                  485238
                </p>
              </td>
<td>
                <p>
                  466149
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  168
                </p>
              </td>
<td>
                <p>
                  352236
                </p>
              </td>
<td>
                <p>
                  500922
                </p>
              </td>
<td>
                <p>
                  481221
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  170
                </p>
              </td>
<td>
                <p>
                  362793
                </p>
              </td>
<td>
                <p>
                  516840
                </p>
              </td>
<td>
                <p>
                  496561
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  172
                </p>
              </td>
<td>
                <p>
                  372645
                </p>
              </td>
<td>
                <p>
                  533169
                </p>
              </td>
<td>
                <p>
                  512315
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  174
                </p>
              </td>
<td>
                <p>
                  382908
                </p>
              </td>
<td>
                <p>
                  549962
                </p>
              </td>
<td>
                <p>
                  528510
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  176
                </p>
              </td>
<td>
                <p>
                  392507
                </p>
              </td>
<td>
                <p>
                  567018
                </p>
              </td>
<td>
                <p>
                  544947
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  178
                </p>
              </td>
<td>
                <p>
                  404163
                </p>
              </td>
<td>
                <p>
                  597694
                </p>
              </td>
<td>
                <p>
                  561666
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  180
                </p>
              </td>
<td>
                <p>
                  417539
                </p>
              </td>
<td>
                <p>
                  615615
                </p>
              </td>
<td>
                <p>
                  578647
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  182
                </p>
              </td>
<td>
                <p>
                  432009
                </p>
              </td>
<td>
                <p>
                  634079
                </p>
              </td>
<td>
                <p>
                  596234
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  184
                </p>
              </td>
<td>
                <p>
                  444684
                </p>
              </td>
<td>
                <p>
                  652902
                </p>
              </td>
<td>
                <p>
                  614114
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  186
                </p>
              </td>
<td>
                <p>
                  457104
                </p>
              </td>
<td>
                <p>
                  672042
                </p>
              </td>
<td>
                <p>
                  632248
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  188
                </p>
              </td>
<td>
                <p>
                  469331
                </p>
              </td>
<td>
                <p>
                  691451
                </p>
              </td>
<td>
                <p>
                  650654
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  190
                </p>
              </td>
<td>
                <p>
                  481583
                </p>
              </td>
<td>
                <p>
                  711512
                </p>
              </td>
<td>
                <p>
                  669753
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  192
                </p>
              </td>
<td>
                <p>
                  477225
                </p>
              </td>
<td>
                <p>
                  698188
                </p>
              </td>
<td>
                <p>
                  689111
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  194
                </p>
              </td>
<td>
                <p>
                  488955
                </p>
              </td>
<td>
                <p>
                  736905
                </p>
              </td>
<td>
                <p>
                  708760
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  196
                </p>
              </td>
<td>
                <p>
                  499797
                </p>
              </td>
<td>
                <p>
                  757502
                </p>
              </td>
<td>
                <p>
                  728675
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  198
                </p>
              </td>
<td>
                <p>
                  511163
                </p>
              </td>
<td>
                <p>
                  778591
                </p>
              </td>
<td>
                <p>
                  749102
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
        The second <a href="http://www.boost.org/doc/libs/release/libs/multiprecision/doc/html/../../performance/rational_determinant_bench.cpp" target="_top">example</a>
        measures the time taken to calculate the determinant of a 3x3 matrix of rational
        numbers. These numbers are randomly generated with <span class="emphasis"><em>n</em></span>
        bits in both numerator and denominator. In this case the rate limiting step
        is the cost of calculating the GCD's during the computation:
      </p>
<div class="table">
<a name="boost_multiprecision.perf.rational_real_world.relative_time_taken_to_calculate"></a><p class="title"><b>Table 1.20. Relative Time Taken to Calculate 100 Determinants of Random 3x3 Matrixes</b></p>
<div class="table-contents"><table class="table" summary="Relative Time Taken to Calculate 100 Determinants of Random 3x3 Matrixes">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Bits
                </p>
              </th>
<th>
                <p>
                  cpp_rational (ms)
                </p>
              </th>
<th>
                <p>
                  mpq_rational (relative to cpp_rational)
                </p>
              </th>
<th>
                <p>
                  mpq_class (relative to cpp_rational)
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  512
                </p>
              </td>
<td>
                <p>
                  45
                </p>
              </td>
<td>
                <p>
                  0.3111111111
                </p>
              </td>
<td>
                <p>
                  0.3177777778
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  1024
                </p>
              </td>
<td>
                <p>
                  103
                </p>
              </td>
<td>
                <p>
                  0.3038834951
                </p>
              </td>
<td>
                <p>
                  0.3038834951
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  2048
                </p>
              </td>
<td>
                <p>
                  251
                </p>
              </td>
<td>
                <p>
                  0.3087649402
                </p>
              </td>
<td>
                <p>
                  0.3011952191
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  4096
                </p>
              </td>
<td>
                <p>
                  667
                </p>
              </td>
<td>
                <p>
                  0.2983508246
                </p>
              </td>
<td>
                <p>
                  0.2893553223
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  8192
                </p>
              </td>
<td>
                <p>
                  2033
                </p>
              </td>
<td>
                <p>
                  0.261682243
                </p>
              </td>
<td>
                <p>
                  0.2956222332
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  16384
                </p>
              </td>
<td>
                <p>
                  6423
                </p>
              </td>
<td>
                <p>
                  0.2358710883
                </p>
              </td>
<td>
                <p>
                  0.3059318076
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  32768
                </p>
              </td>
<td>
                <p>
                  24223
                </p>
              </td>
<td>
                <p>
                  0.1875903067
                </p>
              </td>
<td>
                <p>
                  0.1955992239
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_multiprecision.perf.rational_real_world.platform"></a><p class="title"><b>Table 1.21. Platform Details</b></p>
<div class="table-contents"><table class="table" summary="Platform Details">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
              </th>
<th>
                <p>
                  Version
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  Compiler
                </p>
              </td>
<td>
                <p>
                  GNU C++ version 10.3.0
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  GMP
                </p>
              </td>
<td>
                <p>
                  6.2.0
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  MPFR
                </p>
              </td>
<td>
                <p>
                  262146
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  Boost
                </p>
              </td>
<td>
                <p>
                  107800
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  Run date
                </p>
              </td>
<td>
                <p>
                  Sep 30 2021
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2002-2020 John
      Maddock and Christopher Kormanyos<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="int_real_world.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../perf.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="float_performance.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
